﻿@{
    ViewBag.Title = "ViewPage1";
    Layout = "~/Views/Shared/BaseView.cshtml";
}
@{
    Common.Web.Cookie cookie = new Common.Web.Cookie();
    int visiterId = Convert.ToInt32(cookie.GetCookie("LoginUserId"));
    BenefitHelper.DB.DBManager db = new BenefitHelper.DB.DBManager();
    if (BenefitHelper.Sys.VisitPrower.HasAdminPrower(visiterId, db))
    { 
    <div id="buttons">
        <span>
            <p>
                <a href="/Init" target="_blank" title="后台管理">后台管理</a>
            </p>
        </span>
    </div>
    }
    db.Dispose();
}
<dl id="xiangmu">
    <dt><span id="title2">@ViewBag.op.UName</span></dt>
    <dd>
        <table width="100%" border="0" cellspacing="0" cellpadding="0" id="panhoufenxi">
            <tr>
                <td id="curr_p">
                    <b class="panzhong"><a href="/OperatorRealtimeTransaction/Index/@ViewBag.queryuser/@ViewBag.datequery">
                        盘中分析</a></b><b><a>盘后分析</a></b>
                </td>
                <td class="selected" style="border-left: 1px solid #ecc7b5;">
                    <img src="/Content/images/icon_07.gif" />阶段总结
                </td>
                <td>
                    @if (ViewBag.querymonth.Equals("all"))
                    { 
                        <a href="/XingNeng/Index/@ViewBag.queryuser/@ViewBag.queryyear">
                            <img src="/Content/images/icon_02.gif" />性能汇总</a>
                    }
                    else
                    { 
                        <a href="/XingNeng/Index/@ViewBag.queryuser/@ViewBag.queryyear@ViewBag.querymonth">
                            <img src="/Content/images/icon_02.gif" />性能汇总</a>
                    }
                </td>
                <td>
                    @if (ViewBag.querymonth.Equals("all"))
                    {
                        <a href="/StageSummary/Index/@ViewBag.queryuser/@ViewBag.queryyear">
                            <img src="/Content/images/icon_03.gif" />历史记录</a>
                    }
                    else
                    { 
                        <a href="/StageSummary/Index/@ViewBag.queryuser/@ViewBag.queryyear@ViewBag.querymonth">
                            <img src="/Content/images/icon_03.gif" />历史记录</a>
                    }
                </td>
            </tr>
        </table>
    </dd>
</dl>
<div id="bigDataBox">
    <div class="date-select-bar">
        @for (int i = 1; i <= 12; i++)
        {
            if (!string.IsNullOrEmpty(ViewBag.querymonth.ToString()))
            {
                if (Convert.ToInt32(ViewBag.querymonth) == i)
                { 
            <a href="/AfterAnalysis/Index/@ViewBag.queryuser/@ViewBag.queryyear@ViewBag.querymonth" class='cur'>@i</a>
                }
                else
                {
                    if (i < 10)
                    {
                        string z = "0" + i;
            <a href="/AfterAnalysis/Index/@ViewBag.queryuser/@ViewBag.queryyear@z">@i</a>
                    }
                    else
                    {
            <a href="/AfterAnalysis/Index/@ViewBag.queryuser/@ViewBag.queryyear@i">@i</a>
                    }

                }
            }
            else
            {
                if (i < 10)
                {
                    string z = "0" + i;
            <a href="/AfterAnalysis/Index/@ViewBag.queryuser/@ViewBag.queryyear@z">@i</a>
                }
                else
                {
            <a href="/AfterAnalysis/Index/@ViewBag.queryuser/@ViewBag.queryyear@i">@i</a>
                }

            }
        }
        @if (string.IsNullOrEmpty(ViewBag.querymonth.ToString()))
        {
            <a href="/AfterAnalysis/Index/@ViewBag.queryuser/@ViewBag.queryyear" class='cur'>整年数据</a>
        }
        else
        {
            <a href="/AfterAnalysis/Index/@ViewBag.queryuser/@ViewBag.queryyear">整年数据</a>
        }
    </div>
    <div class="date-select-bar" style="text-align: right; float: right;">
        @for (int i = 2011; i <= DateTime.Now.Year; i++)
        {
            if (Convert.ToInt32(ViewBag.queryyear) == i)
            {
            <a href="/AfterAnalysis/Index/@ViewBag.queryuser/@i@ViewBag.querymonth" class='cur'>@i</a>
            }
            else
            {
            <a href="/AfterAnalysis/Index/@ViewBag.queryuser/@i@ViewBag.querymonth">@i</a>
            }
        }
    </div>
    <br />
    <div style="height: 15px; line-height: 15px;">
    </div>
    <div style="width: 60%; background-repeat: no-repeat; float: left; text-align: left;">
        <img src="/content/images/jiaoyigaikuang.png" />
    </div>
    <table style="width: 100%;" class="list" cellspacing="0" cellpadding="0">
        <tr>
            <td class="title" style="width: 10%;">
                参数
            </td>
            <td class="title" style="width: 40%;">
                值
            </td>
            <td class="title" style="width: 10%;">
                参数
            </td>
            <td class="title" style="width: 40%;">
                值
            </td>
        </tr>
        <tr class="detailsold" onclick="fee(1)">
            <td>
                <div style="float: left; text-align: left; width: 100%;">
                    平仓盈亏</div>
            </td>
            <td style="padding: 1px 1px 1px 1px;">
                <div class="div1" style="float: right; text-align: right; width: 100%;">
                    @string.Format("{0:N2}", ViewBag.sum.Profit)</div>
                <div style="width: 100%; display: none; padding: 1px 1px 1px 1px;" class="table1">
                    <table cellspacing="0" cellpadding="0" class="list2" style="width: 100%; background-color: #f5f7c7">
                        <tr>
                            <td style="text-align: left;" rowspan="4">
                                <div class="raise">
                                    @string.Format("{0:N2}", ViewBag.sum.Profit)</div>
                                @if (!ViewBag.querymonth.Equals(""))
                                {
                                    <div style="color: #535985">
                                        月累计</div>
                                }
                                else
                                {
                                    <div style="color: #535985">
                                        年累计</div>
                                }
                            </td>
                        </tr>
                        <tr>
                            @if (!ViewBag.querymonth.Equals(""))
                            {
                                <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                    <div>
                                        @string.Format("{0:N2}", ViewBag.ysum.Profit)</div>
                                    <div style="font-size: 8pt;">
                                        上月值</div>
                                </td>
                            }
                            <td style="text-align: left; padding-left: 10px;; background-color: #f5f7c7">
                                <div>
                                    @string.Format("{0:N2}", ViewBag.quniansum.Profit)</div>
                                <div style="font-size: 8pt;">
                                    去年同期</div>
                            </td>
                            <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                <div>
                                    @string.Format("{0:N2}", ViewBag.querybatchavgmonth.Profit)</div>
                                <div style="font-size: 8pt;">
                                    同批次均值</div>
                            </td>
                        </tr>
                        <tr>
                            @if (!ViewBag.querymonth.Equals(""))
                            {
                                <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                    <div>
                                        @string.Format("{0:N2}", ViewBag.querynianjunzhi.Profit)</div>
                                    <div style="font-size: 8pt;">
                                        本年均值</div>
                                </td>
                            }
                            <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                <div>
                                    @string.Format("{0:N2}", ViewBag.querchangegroup.Profit)</div>
                                <div style="font-size: 8pt;">
                                    小组均值</div>
                            </td>
                            <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                <div>
                                    @string.Format("{0:N2}", ViewBag.companyavgmonth.Profit)</div>
                                <div style="font-size: 8pt;">
                                    公司均值</div>
                            </td>
                        </tr>
                        <tr>
                            @if (!ViewBag.querymonth.Equals(""))
                            {
                                <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                    <div>
                                        @MvcHtmlString.Create((Math.Round((ViewBag.sum.Profit / ViewBag.querynianleiji.Profit), 2) * 100).ToString())%
                                    </div>
                                    <div style="height: 3px; line-height: 3px;">
                                        &nbsp;
                                    </div>
                                    <div style="font-size: 8pt;">
                                        本年占比</div>
                                </td>
                            }
                            <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                <div>
                                    @string.Format("{0:N2}", ViewBag.querynianleiji.Profit)</div>
                                <div style="height: 3px; line-height: 3px;">
                                    &nbsp;
                                </div>
                                <div style="font-size: 8pt;">
                                    年累计</div>
                            </td>
                            <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                <div>
                                    @string.Format("{0:N2}", ViewBag.querynianyuqi.Profit)</div>
                                <div style="height: 3px; line-height: 3px;">
                                    &nbsp;
                                </div>
                                <div style="font-size: 8pt;">
                                    年度预期</div>
                            </td>
                        </tr>
                    </table>
                </div>
            </td>
            <td>
                <div style="float: left;">
                    手续费</div>
            </td>
            <td style="padding: 1px 1px 1px 1px;" class="leftyes">
                <div style="float: right; text-align: right; width: 100%;" class="div1">
                    @string.Format("{0:N2}", ViewBag.sum.Free)</div>
                <div style="width: 100%; display: none; padding: 1px 1px 1px 1px;" class="table1">
                    <table cellspacing="0" cellpadding="0" class="list2" style="width: 100%; background-color: #f5f7c7">
                        <tr>
                            <td style="text-align: left;" rowspan="4">
                                <div class="raise">
                                    @string.Format("{0:N2}", ViewBag.sum.Free)</div>
                                @if (!ViewBag.querymonth.Equals(""))
                                {
                                    <div style="color: #535985">
                                        月累计</div>
                                }
                                else
                                {
                                    <div style="color: #535985">
                                        年累计</div>
                                }
                            </td>
                        </tr>
                        <tr>
                            @if (!ViewBag.querymonth.Equals(""))
                            {
                                <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                    <div>
                                        @string.Format("{0:N2}", ViewBag.ysum.Free)</div>
                                    <div style="font-size: 8pt;">
                                        上月值</div>
                                </td>
                            }
                            <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                <div>
                                    @string.Format("{0:N2}", ViewBag.quniansum.Free)</div>
                                <div style="font-size: 8pt;">
                                    去年同期</div>
                            </td>
                            <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                <div>
                                    @string.Format("{0:N2}", ViewBag.querybatchavgmonth.Free)</div>
                                <div style="font-size: 8pt;">
                                    同批次均值</div>
                            </td>
                        </tr>
                        <tr>
                            @if (!ViewBag.querymonth.Equals(""))
                            {
                                <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                    <div>
                                        @string.Format("{0:N2}", ViewBag.querynianjunzhi.Free)</div>
                                    <div style="font-size: 8pt;">
                                        本年均值</div>
                                </td>
                            }
                            <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                <div>
                                    @string.Format("{0:N2}", ViewBag.querchangegroup.Free)</div>
                                <div style="font-size: 8pt;">
                                    小组均值</div>
                            </td>
                            <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                <div>
                                    @string.Format("{0:N2}", ViewBag.companyavgmonth.Free)</div>
                                <div style="font-size: 8pt;">
                                    公司均值</div>
                            </td>
                        </tr>
                        <tr>
                            @if (!ViewBag.querymonth.Equals(""))
                            {
                                <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                    <div>
                                        @MvcHtmlString.Create((Math.Round((ViewBag.sum.Free / ViewBag.querynianleiji.Free), 2) * 100).ToString())%</div>
                                    <div style="font-size: 8pt;">
                                        本年占比</div>
                                </td>
                            }
                            <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                <div>
                                    @string.Format("{0:N2}", ViewBag.querynianleiji.Free)</div>
                                <div style="font-size: 8pt;">
                                    年累计</div>
                            </td>
                            <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                <div>
                                    @string.Format("{0:N2}", ViewBag.querynianyuqi.Free)</div>
                                <div style="font-size: 8pt;">
                                    年度预期</div>
                            </td>
                        </tr>
                    </table>
                </div>
            </td>
        </tr>
        <tr class="detailsold" onclick="fee(2)">
            <td>
                <div style="float: left;">
                    净利润</div>
            </td>
            <td style="padding: 1px 1px 1px 1px;">
                <div style="float: right; text-align: right; width: 100%;" class="div2">
                    @string.Format("{0:N2}", ViewBag.sum.DayCount)</div>
                <div style="width: 100%; display: none; padding: 1px 1px 1px 1px;" class="table2">
                    <table cellspacing="0" cellpadding="0" class="list2" style="width: 100%; background-color: #f5f7c7">
                        <tr>
                            <td style="text-align: left;" rowspan="4">
                                <div class="raise">
                                    @string.Format("{0:N2}", ViewBag.sum.DayCount)</div>
                                @if (!ViewBag.querymonth.Equals(""))
                                {
                                    <div style="color: #535985">
                                        月累计</div>
                                }
                                else
                                {
                                    <div style="color: #535985">
                                        年累计</div>
                                }
                            </td>
                        </tr>
                        <tr>
                            @if (!ViewBag.querymonth.Equals(""))
                            {
                                <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                    <div>
                                        @string.Format("{0:N2}", ViewBag.ysum.DayCount)</div>
                                    <div style="font-size: 8pt;">
                                        上月值</div>
                                </td>
                            }
                            <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                <div>
                                    @string.Format("{0:N2}", ViewBag.quniansum.DayCount)</div>
                                <div style="font-size: 8pt;">
                                    去年同期</div>
                            </td>
                            <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                <div>
                                    @string.Format("{0:N2}", ViewBag.querybatchavgmonth.DayCount)</div>
                                <div style="font-size: 8pt;">
                                    同批次均值</div>
                            </td>
                        </tr>
                        <tr>
                            @if (!ViewBag.querymonth.Equals(""))
                            {
                                <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                    <div>
                                        @string.Format("{0:N2}", ViewBag.querynianjunzhi.DayCount)</div>
                                    <div style="font-size: 8pt;">
                                        本年均值</div>
                                </td>
                            }
                            <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                <div>
                                    @string.Format("{0:N2}", ViewBag.querchangegroup.DayCount)</div>
                                <div style="font-size: 8pt;">
                                    小组均值</div>
                            </td>
                            <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                <div>
                                    @string.Format("{0:N2}", ViewBag.companyavgmonth.DayCount)</div>
                                <div style="font-size: 8pt;">
                                    公司均值</div>
                            </td>
                        </tr>
                        <tr>
                            @if (!ViewBag.querymonth.Equals(""))
                            {
                                <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                    <div>
                                        @MvcHtmlString.Create((Math.Round((ViewBag.sum.DayCount / ViewBag.querynianleiji.DayCount), 2) * 100).ToString())%</div>
                                    <div style="font-size: 8pt;">
                                        本年占比</div>
                                </td>
                            }
                            <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                <div>
                                    @string.Format("{0:N2}", ViewBag.querynianleiji.DayCount)</div>
                                <div style="font-size: 8pt;">
                                    年累计</div>
                            </td>
                            <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                <div>
                                    @string.Format("{0:N2}", ViewBag.querynianyuqi.DayCount)</div>
                                <div style="font-size: 8pt;">
                                    年度预期</div>
                            </td>
                        </tr>
                    </table>
                </div>
            </td>
            <td>
                <div style="float: left;">
                    交易笔数</div>
            </td>
            <td style="padding: 1px 1px 1px 1px;" class="leftyes">
                <div style="float: right; text-align: right; width: 100%;" class="div2">
                    @ViewBag.sum.BillCount</div>
                <div style="width: 100%; display: none; padding: 1px 1px 1px 1px;" class="table2">
                    <table cellspacing="0" cellpadding="0" class="list2" style="width: 100%; background-color: #f5f7c7">
                        <tr>
                            <td style="text-align: left;" rowspan="4">
                                <div class="raise">
                                    @ViewBag.sum.BillCount</div>
                                @if (!ViewBag.querymonth.Equals(""))
                                {
                                    <div style="color: #535985">
                                        月累计</div>
                                }
                                else
                                {
                                    <div style="color: #535985">
                                        年累计</div>
                                }
                            </td>
                        </tr>
                        <tr>
                            @if (!ViewBag.querymonth.Equals(""))
                            {
                                <td style="text-align: left; padding-left: 10px;background-color: #f5f7c7">
                                    <div>
                                        @ViewBag.ysum.BillCount</div>
                                    <div style="font-size: 8pt;">
                                        上月值</div>
                                </td>
                            }
                            <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                <div>
                                    @ViewBag.quniansum.BillCount</div>
                                <div style="font-size: 8pt;">
                                    去年同期</div>
                            </td>
                            <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                <div>
                                    @ViewBag.querybatchavgmonth.BillCount</div>
                                <div style="font-size: 8pt;">
                                    同批次均值</div>
                            </td>
                        </tr>
                        <tr>
                            @if (!ViewBag.querymonth.Equals(""))
                            {
                                <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                    <div>
                                        @ViewBag.querynianjunzhi.BillCount</div>
                                    <div style="font-size: 8pt;">
                                        本年均值</div>
                                </td>
                            }
                            <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                <div>
                                    @ViewBag.querchangegroup.BillCount</div>
                                <div style="font-size: 8pt;">
                                    小组均值</div>
                            </td>
                            <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                <div>
                                    @ViewBag.companyavgmonth.BillCount</div>
                                <div style="font-size: 8pt;">
                                    公司均值</div>
                            </td>
                        </tr>
                        <tr>
                            @if (!ViewBag.querymonth.Equals(""))
                            {
                                <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                    <div>
                                        @MvcHtmlString.Create((Math.Round((ViewBag.sum.BillCount / ViewBag.querynianleiji.BillCount), 2) * 100).ToString())%</div>
                                    <div style="font-size: 8pt;">
                                        本年占比</div>
                                </td>
                            }
                            <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                <div>
                                    @ViewBag.querynianleiji.BillCount</div>
                                <div style="font-size: 8pt;">
                                    年累计</div>
                            </td>
                            <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                <div>
                                    @ViewBag.querynianyuqi.BillCount</div>
                                <div style="font-size: 8pt;">
                                    年度预期</div>
                            </td>
                        </tr>
                    </table>
                </div>
            </td>
        </tr>
        <tr class="detailsold" onclick="fee(3)">
            <td>
                <div style="float: left;">
                    平均持仓时长</div>
            </td>
            <td style="padding: 1px 1px 1px 1px;">
                <div style="float: right; text-align: right; width: 100%;" class="div3">
                    @ViewBag.sum.AvgPostionTime</div>
                <div style="width: 100%; display: none; padding: 1px 1px 1px 1px;" class="table3">
                    <table cellspacing="0" cellpadding="0" class="list2" style="width: 100%; background-color: #f5f7c7">
                        <tr>
                            <td style="text-align: left;" rowspan="4">
                                <div class="raise">
                                    @ViewBag.sum.AvgPostionTime</div>
                                @if (!ViewBag.querymonth.Equals(""))
                                {
                                    <div style="color: #535985">
                                        月累计</div>
                                }
                                else
                                {
                                    <div style="color: #535985">
                                        年累计</div>
                                }
                            </td>
                        </tr>
                        <tr>
                            @if (!ViewBag.querymonth.Equals(""))
                            {
                                <td style="text-align: left; padding-left: 10px;background-color: #f5f7c7">
                                    <div>
                                        @ViewBag.ysum.AvgPostionTime</div>
                                    <div style="font-size: 8pt;">
                                        上月值</div>
                                </td>
                            }
                            <td style="text-align: left; padding-left: 10px;background-color: #f5f7c7">
                                <div>
                                    @ViewBag.quniansum.AvgPostionTime</div>
                                <div style="font-size: 8pt;">
                                    去年同期</div>
                            </td>
                            <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                <div>
                                    @ViewBag.querybatchavgmonth.AvgPostionTime</div>
                                <div style="font-size: 8pt;">
                                    同批次均值</div>
                            </td>
                        </tr>
                        <tr>
                            @if (!ViewBag.querymonth.Equals(""))
                            {
                                <td style="text-align: left; padding-left: 10px;background-color: #f5f7c7">
                                    <div>
                                        @ViewBag.querynianjunzhi.AvgPostionTime</div>
                                    <div style="font-size: 8pt;">
                                        本年均值</div>
                                </td>
                            }
                            <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                <div>
                                    @ViewBag.querchangegroup.AvgPostionTime</div>
                                <div style="font-size: 8pt;">
                                    小组均值</div>
                            </td>
                            <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                <div>
                                    @ViewBag.companyavgmonth.AvgPostionTime</div>
                                <div style="font-size: 8pt;">
                                    公司均值</div>
                            </td>
                        </tr>
                        <tr>
                            @if (!ViewBag.querymonth.Equals(""))
                            {
                                <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                    <div>
                                        @MvcHtmlString.Create((Math.Round((ViewBag.sum.AvgPostionTime / ViewBag.querynianleiji.AvgPostionTime), 2) * 100).ToString())%</div>
                                    <div style="font-size: 8pt;">
                                        本年占比</div>
                                </td>
                            }
                            <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                <div>
                                    @ViewBag.querynianleiji.AvgPostionTime</div>
                                <div style="font-size: 8pt;">
                                    年累计</div>
                            </td>
                            <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                <div>
                                    @ViewBag.querynianyuqi.AvgPostionTime</div>
                                <div style="font-size: 8pt;">
                                    年度预期</div>
                            </td>
                        </tr>
                    </table>
                </div>
            </td>
            <td>
                <div style="float: left;">
                    最大回撤</div>
            </td>
            <td style="padding: 1px 1px 1px 1px;" class="leftyes">
                <div style="float: right; text-align: right; width: 100%;" class="div3">
                    @string.Format("{0:N2}", ViewBag.sum.MaxReturn)</div>
                <div style="width: 100%; display: none; padding: 1px 1px 1px 1px;" class="table3">
                    <table cellspacing="0" cellpadding="0" class="list2" style="width: 100%; background-color: #f5f7c7">
                        <tr>
                            <td style="text-align: left;" rowspan="4">
                                <div class="raise">
                                    @string.Format("{0:N2}", ViewBag.sum.MaxReturn)</div>
                                @if (!ViewBag.querymonth.Equals(""))
                                {
                                    <div style="color: #535985">
                                        月累计</div>
                                }
                                else
                                {
                                    <div style="color: #535985">
                                        年累计</div>
                                }
                            </td>
                        </tr>
                        <tr>
                            @if (!ViewBag.querymonth.Equals(""))
                            {
                                <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                    <div>
                                        @string.Format("{0:N2}", ViewBag.ysum.MaxReturn)</div>
                                    <div style="font-size: 8pt;">
                                        上月值</div>
                                </td>
                            }
                            <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                <div>
                                    @string.Format("{0:N2}", ViewBag.quniansum.MaxReturn)</div>
                                <div style="font-size: 8pt;">
                                    去年同期</div>
                            </td>
                            <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                <div>
                                    @string.Format("{0:N2}", ViewBag.querybatchavgmonth.MaxReturn)</div>
                                <div style="font-size: 8pt;">
                                    同批次均值</div>
                            </td>
                        </tr>
                        <tr>
                            @if (!ViewBag.querymonth.Equals(""))
                            {
                                <td style="text-align: left; padding-left: 10px;background-color: #f5f7c7">
                                    <div>
                                        @string.Format("{0:N2}", ViewBag.querynianjunzhi.MaxReturn)</div>
                                    <div style="font-size: 8pt;">
                                        本年均值</div>
                                </td>
                            }
                            <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                <div>
                                    @string.Format("{0:N2}", ViewBag.querchangegroup.MaxReturn)</div>
                                <div style="font-size: 8pt;">
                                    小组均值</div>
                            </td>
                            <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                <div>
                                    @string.Format("{0:N2}", ViewBag.companyavgmonth.MaxReturn)</div>
                                <div style="font-size: 8pt;">
                                    公司均值</div>
                            </td>
                        </tr>
                        <tr>
                            @if (!ViewBag.querymonth.Equals(""))
                            {
                                <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                    <div>
                                        @MvcHtmlString.Create((Math.Round((ViewBag.sum.MaxReturn / ViewBag.querynianleiji.MaxReturn), 2) * 100).ToString())%</div>
                                    <div style="font-size: 8pt;">
                                        本年占比</div>
                                </td>
                            }
                            <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                <div>
                                    @string.Format("{0:N2}", ViewBag.querynianleiji.MaxReturn)</div>
                                <div style="font-size: 8pt;">
                                    年累计</div>
                            </td>
                            <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                <div>
                                    @string.Format("{0:N2}", ViewBag.querynianyuqi.MaxReturn)</div>
                                <div style="font-size: 8pt;">
                                    年度预期</div>
                            </td>
                        </tr>
                    </table>
                </div>
            </td>
        </tr>
        <tr class="detailsold" onclick="fee(4)">
            <td>
                <div style="float: left;">
                    总亏损</div>
            </td>
            <td style="padding: 1px 1px 1px 1px;">
                <div style="float: right; text-align: right; width: 100%;" class="div4">
                    @string.Format("{0:N2}", ViewBag.sum.SumLost)</div>
                <div style="width: 100%; display: none; padding: 1px 1px 1px 1px;" class="table4">
                    <table cellspacing="0" cellpadding="0" class="list2" style="width: 100%; background-color: #f5f7c7">
                        <tr>
                            <td style="text-align: left;" rowspan="4">
                                <div class="raise">
                                    @string.Format("{0:N2}", ViewBag.sum.SumLost)</div>
                                @if (!ViewBag.querymonth.Equals(""))
                                {
                                    <div style="color: #535985">
                                        月累计</div>
                                }
                                else
                                {
                                    <div style="color: #535985">
                                        年累计</div>
                                }
                            </td>
                        </tr>
                        <tr>
                            @if (!ViewBag.querymonth.Equals(""))
                            {
                                <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                    <div>
                                        @string.Format("{0:N2}", ViewBag.ysum.SumLost)</div>
                                    <div style="font-size: 8pt;">
                                        上月值</div>
                                </td>
                            }
                            <td style="text-align: left; padding-left: 10px;background-color: #f5f7c7">
                                <div>
                                    @string.Format("{0:N2}", ViewBag.quniansum.SumLost)</div>
                                <div style="font-size: 8pt;">
                                    去年同期</div>
                            </td>
                            <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                <div>
                                    @string.Format("{0:N2}", ViewBag.querybatchavgmonth.SumLost)</div>
                                <div style="font-size: 8pt;">
                                    同批次均值</div>
                            </td>
                        </tr>
                        <tr>
                            @if (!ViewBag.querymonth.Equals(""))
                            {
                                <td style="text-align: left; padding-left: 10px;background-color: #f5f7c7">
                                    <div>
                                        @string.Format("{0:N2}", ViewBag.querynianjunzhi.SumLost)</div>
                                    <div style="font-size: 8pt;">
                                        本年均值</div>
                                </td>
                            }
                            <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                <div>
                                    @string.Format("{0:N2}", ViewBag.querchangegroup.SumLost)</div>
                                <div style="font-size: 8pt;">
                                    小组均值</div>
                            </td>
                            <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                <div>
                                    @string.Format("{0:N2}", ViewBag.companyavgmonth.SumLost)</div>
                                <div style="font-size: 8pt;">
                                    公司均值</div>
                            </td>
                        </tr>
                        <tr>
                            @if (!ViewBag.querymonth.Equals(""))
                            {
                                <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                    <div>
                                        @MvcHtmlString.Create((Math.Round((ViewBag.sum.SumLost / ViewBag.querynianleiji.SumLost), 2) * 100).ToString())%</div>
                                    <div style="font-size: 8pt;">
                                        本年占比</div>
                                </td>
                            }
                            <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                <div>
                                    @string.Format("{0:N2}", ViewBag.querynianleiji.SumLost)</div>
                                <div style="font-size: 8pt;">
                                    年累计</div>
                            </td>
                            <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                <div>
                                    @string.Format("{0:N2}", ViewBag.querynianyuqi.SumLost)</div>
                                <div style="font-size: 8pt;">
                                    年度预期</div>
                            </td>
                        </tr>
                    </table>
                </div>
            </td>
            <td>
                <div style="float: left;">
                    总盈利</div>
            </td>
            <td style="padding: 1px 1px 1px 1px;" class="leftyes">
                <div style="float: right; text-align: right; width: 100%;" class="div4">
                    @string.Format("{0:N2}", ViewBag.sum.SumWin)</div>
                <div style="width: 100%; display: none; padding: 1px 1px 1px 1px;" class="table4">
                    <table cellspacing="0" cellpadding="0" class="list2" style="width: 100%; background-color: #f5f7c7">
                        <tr>
                            <td style="text-align: left;" rowspan="4">
                                <div class="raise">
                                    @string.Format("{0:N2}", ViewBag.sum.SumWin)</div>
                                @if (!ViewBag.querymonth.Equals(""))
                                {
                                    <div style="color: #535985">
                                        月累计</div>
                                }
                                else
                                {
                                    <div style="color: #535985">
                                        年累计</div>
                                }
                            </td>
                        </tr>
                        <tr>
                            @if (!ViewBag.querymonth.Equals(""))
                            {
                                <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                    <div>
                                        @string.Format("{0:N2}", ViewBag.ysum.SumWin)</div>
                                    <div style="font-size: 8pt;">
                                        上月值</div>
                                </td>
                            }
                            <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                <div>
                                    @string.Format("{0:N2}", ViewBag.quniansum.SumWin)</div>
                                <div style="font-size: 8pt;">
                                    去年同期</div>
                            </td>
                            @if (!ViewBag.querymonth.Equals(""))
                            {
                                <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                    <div>
                                        @string.Format("{0:N2}", ViewBag.querybatchavgmonth.SumWin)</div>
                                    <div style="font-size: 8pt;">
                                        同批次均值</div>
                                </td>}
                        </tr>
                        <tr>
                            @if (!ViewBag.querymonth.Equals(""))
                            {
                                <td style="text-align: left; padding-left: 10px;background-color: #f5f7c7">
                                    <div>
                                        @string.Format("{0:N2}", ViewBag.querynianjunzhi.SumWin)</div>
                                    <div style="font-size: 8pt;">
                                        本年均值</div>
                                </td>
                            }
                            <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                <div>
                                    @string.Format("{0:N2}", ViewBag.querchangegroup.SumWin)</div>
                                <div style="font-size: 8pt;">
                                    小组均值</div>
                            </td>
                            <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                <div>
                                    @string.Format("{0:N2}", ViewBag.companyavgmonth.SumWin)</div>
                                <div style="font-size: 8pt;">
                                    公司均值</div>
                            </td>
                        </tr>
                        <tr>
                            @if (!ViewBag.querymonth.Equals(""))
                            {
                                <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                    <div>
                                        @MvcHtmlString.Create((Math.Round((ViewBag.sum.SumWin / ViewBag.querynianleiji.SumWin), 2) * 100).ToString())%</div>
                                    <div style="font-size: 8pt;">
                                        本年占比</div>
                                </td>
                            }
                            <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                <div>
                                    @string.Format("{0:N2}", ViewBag.querynianleiji.SumWin)</div>
                                <div style="font-size: 8pt;">
                                    年累计</div>
                            </td>
                            <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                <div>
                                    @string.Format("{0:N2}", ViewBag.querynianyuqi.SumWin)</div>
                                <div style="font-size: 8pt;">
                                    年度预期</div>
                            </td>
                        </tr>
                    </table>
                </div>
            </td>
        </tr>
        <tr class="detailsold" onclick="fee(5)">
            <td class="bottomyes">
                <div style="float: left;">
                    保证金占用</div>
            </td>
            <td style="padding: 1px 1px 1px 1px;" class="bottomyes">
                <div style="float: right; text-align: right; width: 100%;" class="div5">
                    @string.Format("{0:N2}", ViewBag.sum.UsedMargin)</div>
                <div style="width: 100%; display: none; padding: 1px 1px 1px 1px;" class="table5">
                    <table cellspacing="0" cellpadding="0" class="list2" style="width: 100%; background-color: #f5f7c7">
                        <tr>
                            <td style="text-align: left;" rowspan="4">
                                <div class="raise">
                                    @string.Format("{0:N2}", ViewBag.sum.UsedMargin)</div>
                                @if (!ViewBag.querymonth.Equals(""))
                                {
                                    <div style="color: #535985">
                                        月累计</div>
                                }
                                else
                                {
                                    <div style="color: #535985">
                                        年累计</div>
                                }
                            </td>
                        </tr>
                        <tr>
                            @if (!ViewBag.querymonth.Equals(""))
                            {
                                <td style="text-align: left; padding-left: 10px;background-color: #f5f7c7">
                                    <div>
                                        @string.Format("{0:N2}", ViewBag.ysum.UsedMargin)</div>
                                    <div style="font-size: 8pt;">
                                        上月值</div>
                                </td>
                            }
                            <td style="text-align: left; padding-left: 10px;background-color: #f5f7c7">
                                <div>
                                    @string.Format("{0:N2}", ViewBag.quniansum.UsedMargin)</div>
                                <div style="font-size: 8pt;">
                                    去年同期</div>
                            </td>
                            <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                <div>
                                    @string.Format("{0:N2}", ViewBag.querybatchavgmonth.UsedMargin)</div>
                                <div style="font-size: 8pt;">
                                    同批次均值</div>
                            </td>
                        </tr>
                        <tr>
                            @if (!ViewBag.querymonth.Equals(""))
                            {
                                <td style="text-align: left; padding-left: 10px;background-color: #f5f7c7">
                                    <div>
                                        @string.Format("{0:N2}", ViewBag.querynianjunzhi.UsedMargin)</div>
                                    <div style="font-size: 8pt;">
                                        本年均值</div>
                                </td>
                            }
                            <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                <div>
                                    @string.Format("{0:N2}", ViewBag.querchangegroup.UsedMargin)</div>
                                <div style="font-size: 8pt;">
                                    小组均值</div>
                            </td>
                            <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                <div>
                                    @string.Format("{0:N2}", ViewBag.companyavgmonth.UsedMargin)</div>
                                <div style="font-size: 8pt;">
                                    公司均值</div>
                            </td>
                        </tr>
                        <tr>
                            @if (!ViewBag.querymonth.Equals(""))
                            {
                                <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                    <div>
                                        @MvcHtmlString.Create((Math.Round((ViewBag.sum.UsedMargin / ViewBag.querynianleiji.UsedMargin), 2) * 100).ToString())%</div>
                                    <div style="font-size: 8pt;">
                                        本年占比</div>
                                </td>
                            }
                            <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                <div>
                                    @string.Format("{0:N2}", ViewBag.querynianleiji.UsedMargin)</div>
                                <div style="font-size: 8pt;">
                                    年累计</div>
                            </td>
                            <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                <div>
                                    @string.Format("{0:N2}", ViewBag.querynianyuqi.UsedMargin)</div>
                                <div style="font-size: 8pt;">
                                    年度预期</div>
                            </td>
                        </tr>
                    </table>
                </div>
            </td>
            <td>
                <div style="float: left;">
                    超出止损次数</div>
            </td>
            <td style="padding: 1px 1px 1px 1px;" class="bottomyes leftyes">
                <div style="float: right; text-align: right; width: 100%;" class="div5">
                    @ViewBag.sum.OverStopLoss</div>
                <div style="width: 100%; display: none; padding: 1px 1px 1px 1px;" class="table5">
                    <table cellspacing="0" cellpadding="0" class="list2" style="width: 100%; background-color: #f5f7c7">
                        <tr>
                            <td style="text-align: left;" rowspan="4">
                                <div class="raise">
                                    @ViewBag.sum.OverStopLoss</div>
                                @if (!ViewBag.querymonth.Equals(""))
                                {
                                    <div style="color: #535985">
                                        月累计</div>
                                }
                                else
                                {
                                    <div style="color: #535985">
                                        年累计</div>
                                }
                            </td>
                        </tr>
                        <tr>
                            @if (!ViewBag.querymonth.Equals(""))
                            {
                                <td style="text-align: left; padding-left: 10px;background-color: #f5f7c7">
                                    <div>
                                        @ViewBag.ysum.OverStopLoss</div>
                                    <div style="font-size: 8pt;">
                                        上月值</div>
                                </td>
                            }
                            <td style="text-align: left; padding-left: 10px;background-color: #f5f7c7">
                                <div>
                                    @ViewBag.quniansum.OverStopLoss</div>
                                <div style="font-size: 8pt;">
                                    去年同期</div>
                            </td>
                            <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                <div>
                                    @ViewBag.querybatchavgmonth.OverStopLoss</div>
                                <div style="font-size: 8pt;">
                                    同批次均值</div>
                            </td>
                        </tr>
                        <tr>
                            @if (!ViewBag.querymonth.Equals(""))
                            {
                                <td style="text-align: left; padding-left: 10px;background-color: #f5f7c7">
                                    <div>
                                        @ViewBag.querynianjunzhi.OverStopLoss</div>
                                    <div style="font-size: 8pt;">
                                        本年均值</div>
                                </td>
                            }
                            <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                <div>
                                    @ViewBag.querchangegroup.OverStopLoss</div>
                                <div style="font-size: 8pt;">
                                    小组均值</div>
                            </td>
                            <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                <div>
                                    @ViewBag.companyavgmonth.OverStopLoss</div>
                                <div style="font-size: 8pt;">
                                    公司均值</div>
                            </td>
                        </tr>
                        <tr>
                              @if (!ViewBag.querymonth.Equals(""))
                            {
                            <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                <div>
                                    @MvcHtmlString.Create((Math.Round((ViewBag.sum.OverStopLoss / ViewBag.querynianleiji.OverStopLoss), 2) * 100).ToString())%</div>
                                <div style="font-size: 8pt;">
                                    本年占比</div>
                            </td>
                                  }
                            <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                <div>
                                    @ViewBag.querynianleiji.OverStopLoss</div>
                                <div style="font-size: 8pt;">
                                    年累计</div>
                            </td>
                            <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                <div>
                                    @ViewBag.querynianyuqi.OverStopLoss</div>
                                <div style="font-size: 8pt;">
                                    年度预期</div>
                            </td>
                        </tr>
                    </table>
                </div>
            </td>
        </tr>
    </table>
        <div style="height: 15px; line-height: 15px;">
    </div>
    <div style="width: 100%; height: 300px;" id="showflash2">
    </div>
    <div style="height: 5px;">
    </div>
    <div class="report-tip">
        <div class="report-tip-text">
            <div>
                <b>功能说明：</b></div>
            <div>
                持仓时长：当日所有平仓对于其开仓的时间差，精切到秒。<br />
                最大回撤：当日累计亏损的最大值。<br />
                总亏损：把平仓盈亏分成两部分，总盈亏只计算盈利的部分。<br />
                总盈利：把平仓盈亏分成两部分，总盈亏只计算亏损的部分。<br />
                超损次数：如果平仓盈亏超出管理平台设置的追保风险度或强平风险度，超损次数加一。<br />
            </div>
        </div>
        <div class="report-tip-close">
            &nbsp;</div>
        <div class="report-tip-text">
            <div>
                <b>使用帮助：</b></div>
            <div>
                本内容主要是将月内的交易情况汇总，以便于用户可以通过分析来获取交易数据，并通过横向与纵向的值进行比较，大致得出交易员当前交易状态。</div>
        </div>
        <div class="report-tip-text">
            <div>
                <b>数据更新：</b></div>
            <div>
                通过融航期货交易平台导出的结算单再做一次二次结算，每天数据会有更新。</div>
        </div>
    </div>
</div>
@MvcHtmlString.Create(ViewBag.js)
<script type="text/javascript" src="/Scripts/jquery-ui-1.8.11.min.js"></script>
<script type="text/javascript">
    MonthBenefit(1);
    //  BillWinLose();
    //   Chengjiaoliang();
    function changeMonth(a) {
        MonthBenefit(a);
    }
    function showDetail() {
        if ($('#ad').attr('class') == "detailsold") {
            $("#ad").removeClass("detailsold").addClass("detailsoldclick");
        } else {
            $("#ad").removeClass("detailsoldclick").addClass("detailsold");
        }
        $(".detailslist").toggle();
    } function changediv(id) {
        if (id == 1) {
            document.getElementById("table1").style.display = "block";
            document.getElementById("table2").style.display = "none";
        } else {
            document.getElementById("table2").style.display = "block";
            document.getElementById("table1").style.display = "none";
        }
    }
    function showdiv3() {
        if (document.getElementById("table3").style.display == "block") {
            document.getElementById("table3").style.display = "none";
        } else {
            document.getElementById("table3").style.display = "block";
        }

    }
    $(document).ready(function () {
        $("#myshowdiv").draggable();
    }
     );

    function fff() {
        $(".basehiddendiv").toggle();
        $(".aew").toggle();
        //    $(".detailsold").removeClass("detailsold").addClass("detailsoldclick");
    }

    function fsa(c) {
        var offset = $("#fs").offset();
        if (c == 1) {
            $("#myshowdiv").css("left", offset.left + 5);
            $("#myshowdiv").css("top", offset.top - 175);
        } else {
            $("#myshowdiv").css("left", offset.left - 545);
            $("#myshowdiv").css("top", offset.top - 175);
        }
        $("#myshowdiv").toggle();

    }
    function fee(id) {
        $(".div" + id).toggle();
        $(".table" + id).toggle();
    }
</script>
